home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cbm
/
demodisks
/
drives
/
1581-demo.lzh
/
backup 64-1581
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1994-10-19
|
4KB
|
72 lines
10 sys04839:r$="try"
15 poke53281,0:poke53280,0
20 ps=0:bl$=" "
25 bl$=bl$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]":d$=""
30 l2$="[155][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":zz=8:px=57093:pokepx,0:if(peek(px)<>0)then45
35 pokepx,255:if(peek(px)<>255)then45
40 zz=3
45 nd=0:u=8:gosub330
50 u=9:gosub330:ifnd=2then65
55 u=10:gosub330:ifnd=2then65
60 u=11:gosub330
65 u=su:ap$=right$(str$(zz),2)+" passes ":ifnd=2thenap$=" one pass "
70 print"[147]"spc(7)l2$:printspc(7)"[159] c64 backup 1581 disk ":printspc(7)l2$
75 print"[159] to avoid mistakes, slide the write "
80 print" protect tab on the right side of "
85 print" your original disk into the open "
90 print" position. it will take 20 minutes ":remap$
95 print" to backup a full disk. "
100 ln$=" "+l2$+"[192][192][192][192][192][192][192][192][192][192][192]":u$="[145][145][145][145][145][145][145][145]"
105 print""ln$:printspc(2)"[159] instructions:":println$""d$
110 uu=1:ifu>9thenuu=2
115 ifpeek(10255)=0then225
120 if nd=0 then225
130 println$:print" [159]unit:"u spc(uu)"[159] pass: 1 [159]r to restart"
135 println$"[145][145][145][145][145][145][145][145][145][145][145][145]"
140 gosub350:poke10260,u:gosub235:sys10240:print"";
145 gosub315:ifa<>0then280
150 gosub235
155 open15,u,15,"n0:temp,"+id$:close15
160 ln=0:gosub315:ifa<>0thenln=150:goto280
165 sys10243:print"";
170 gosub315:ifa<>0then280
175 forpx=0tozz-2
180 gosub235:sys10240:print"";
185 gosub315:ifa<>0then280
190 gosub235:sys10243:print"";
195 gosub315:ifa<>0then280
200 ifpeek(10255)=81then210
205 nextpx
210 open15,u,15,"i0":close15
215 print""d$d$d$:gosub325:printspc(13)"all done.":r$="run":goto285
220 poke52,160:poke56,160:clr:end
225 print""d$d$d$:gosub325:printspc(9)"sorry, bad connection"
230 printspc(8)"c128 with 1581 required.":goto285
235 if(ps>1)and((psand1)=0)thengosub320
240 ap$="writ":dp$="destination":ps=ps+1
245 if(psand1)=1thendp$="original":ap$="read"
250 ag$=" again,":ifps<3thenag$=","
255 printspc(7)"insert "dp$" disk"ag$
260 printspc(7)"press any key when ready."
265 geta$:ifa$=""then265
270 ifa$="r"thenclr:goto310
275 printspc(7)ap$"ing...":return
280 print""d$d$d$:gosub325:printspc(11)"sorry, disk error"
285 print:printspc(7)"press q to quit; or press"
290 printspc(7)"any other key to "r$" again,"
295 geta$:ifa$=""then295
300 ifa$="q"thenprint"[147]":goto220
305 ifln=150thengosub315:print"[145][145]":goto150
310 poke52,160:poke56,160:clr:run
315 open15,u,15:input#15,a,b$,c,d:close15
316 ifpeek(10269)<>0thena=78:b$="backup read error":return
317 ifpeek(10270)<>0thena=78:b$="backup write error":return
318 return
320 print""spc(19)ps/2+1"[145][145][145]"
325 printu$;:forx=1to8:printbl$"";:nextx:print"[145]"u$:return
330 poke10268,u:sys10252
335 ifpeek(10268)=0then345
340 nd=nd+1:du=u:ifnd=1thensu=u
345 return
350 open2,u,0,"$0:":forx=1to26:get#2,a$:next:get#2,a$,b$:id$=a$+b$:close2:return